how to represent a function as a power series